package com.hsnn.medstgmini.base.std.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.hsnn.medstgmini.base.dict.model.DicDrugform;
import com.hsnn.medstgmini.base.dict.model.DicDrugmaterial;
import com.hsnn.medstgmini.base.dict.model.DicDrugspec;


/**
 * StdDruginfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="std_druginfo")

public class StdDrugInfo  implements Serializable {


    // Fields    

     /**
	 *@category 
	 *2015年8月17日
	 *kee
	 *下午5:53:45
	 */
	private static final long serialVersionUID = 1L;
	private String drugId;
     private String drugCode;
     private String drugName;
     private String drugNameSpel;
     private String drugNameEng;
     private String busName;
     private DicDrugform drugform;
     private DicDrugspec drugspec;
     private Integer factor;
     private String unit;
     private String prodCompId;
     private StdCompinfo compinfo;
     private DicDrugmaterial drugmaterial;
     private String approvalCode;
     private Date approvalDate;
     private Short status;
     private Date updDatetime;
     private String updUser;
     private String historyDrugCode;
     private Short mergeStatus;
     private StdDruginfoDetail stdDruginfoDetail;

  
    @Id
    @Column(name="drug_id", length=36)
    public String getDrugId() {
        return this.drugId;
    }
    
    public void setDrugId(String drugId) {
        this.drugId = drugId;
    }
    
    @Column(name="drug_code", nullable=false, length=100)

    public String getDrugCode() {
        return this.drugCode;
    }
    
    public void setDrugCode(String drugCode) {
        this.drugCode = drugCode;
    }
    
    @Column(name="drug_name", nullable=false, length=512)

    public String getDrugName() {
        return this.drugName;
    }
    
    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }
    
    @Column(name="drug_name_spel", length=128)

    public String getDrugNameSpel() {
        return this.drugNameSpel;
    }
    
    public void setDrugNameSpel(String drugNameSpel) {
        this.drugNameSpel = drugNameSpel;
    }
    
    @Column(name="drug_name_eng", length=512)

    public String getDrugNameEng() {
        return this.drugNameEng;
    }
    
    public void setDrugNameEng(String drugNameEng) {
        this.drugNameEng = drugNameEng;
    }
    
    @Column(name="bus_name", length=256)

    public String getBusName() {
        return this.busName;
    }
    
    public void setBusName(String busName) {
        this.busName = busName;
    }
   
    @Column(name="factor")

    public Integer getFactor() {
        return this.factor;
    }
    
    public void setFactor(Integer factor) {
        this.factor = factor;
    }
    
    @Column(name="unit", length=36)

    public String getUnit() {
        return this.unit;
    }
    
    public void setUnit(String unit) {
        this.unit = unit;
    }
    
    
    @Transient
    public String getProdCompId() {
        return this.prodCompId;
    }
    
    public void setProdCompId(String prodCompId) {
        this.prodCompId = prodCompId;
    }
    
    @Column(name="approval_code", length=100)

    public String getApprovalCode() {
        return this.approvalCode;
    }
    
    public void setApprovalCode(String approvalCode) {
        this.approvalCode = approvalCode;
    }
    
    @Column(name="approval_date", length=19)

    public Date getApprovalDate() {
        return this.approvalDate;
    }
    
    public void setApprovalDate(Date approvalDate) {
        this.approvalDate = approvalDate;
    }
    
    @Column(name="status")

    public Short getStatus() {
        return this.status;
    }
    
    public void setStatus(Short status) {
        this.status = status;
    }
    
    @Column(name="upd_datetime", length=19)

    public Date getUpdDatetime() {
        return this.updDatetime;
    }
    
    public void setUpdDatetime(Date updDatetime) {
        this.updDatetime = updDatetime;
    }
    
    @Column(name="upd_user", length=36)

    public String getUpdUser() {
        return this.updUser;
    }
    
    public void setUpdUser(String updUser) {
        this.updUser = updUser;
    }
    
    @Column(name="history_drug_code", length=100)

    public String getHistoryDrugCode() {
        return this.historyDrugCode;
    }
    
    public void setHistoryDrugCode(String historyDrugCode) {
        this.historyDrugCode = historyDrugCode;
    }
    
    @Column(name="merge_status")

    public Short getMergeStatus() {
        return this.mergeStatus;
    }
    
    public void setMergeStatus(Short mergeStatus) {
        this.mergeStatus = mergeStatus;
    }
    @ManyToOne(cascade = { CascadeType.ALL })
    @NotFound(action=NotFoundAction.IGNORE)
	@JoinColumn(name = "form_id")
	public DicDrugform getDrugform() {
		return drugform;
	}

	public void setDrugform(DicDrugform drugform) {
		this.drugform = drugform;
	}
	@javax.persistence.ManyToOne(cascade = { CascadeType.ALL })
	@NotFound(action=NotFoundAction.IGNORE)
	@JoinColumn(name = "spec_id")
	public DicDrugspec getDrugspec() {
		return drugspec;
	}
	
	public void setDrugspec(DicDrugspec drugspec) {
		this.drugspec = drugspec;
	}
	@javax.persistence.ManyToOne(cascade = { CascadeType.ALL })
	@NotFound(action=NotFoundAction.IGNORE)
	@JoinColumn(name = "prod_comp_id")
	public StdCompinfo getCompinfo() {
		return compinfo;
	}

	public void setCompinfo(StdCompinfo compinfo) {
		this.compinfo = compinfo;
	}
	@javax.persistence.ManyToOne(cascade = { CascadeType.ALL })
	@NotFound(action=NotFoundAction.IGNORE)
	@JoinColumn(name = "material_id")
	public DicDrugmaterial getDrugmaterial() {
		return drugmaterial;
	}

	public void setDrugmaterial(DicDrugmaterial drugmaterial) {
		this.drugmaterial = drugmaterial;
	}
   
	@javax.persistence.OneToOne(cascade = { CascadeType.ALL })
	@NotFound(action=NotFoundAction.IGNORE)
	@JoinColumn(name = "drug_id")
    public StdDruginfoDetail getStdDruginfoDetail() {
		return stdDruginfoDetail;
	}

	public void setStdDruginfoDetail(StdDruginfoDetail stdDruginfoDetail) {
		this.stdDruginfoDetail = stdDruginfoDetail;
	}






}